CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_capacity_field(
id                                                 bigint                         COMMENT '主键ID',
task_no                                            String                         COMMENT '任务单号',
network_id                                         bigint                         COMMENT '经停网点ID',
network_code                                       String                         COMMENT '经停网点编码',
network_name                                       String                         COMMENT '经停网点名称',
sort_num                                           smallint                       COMMENT '经停顺序',
planned_arrival_time                               timestamp                      COMMENT '规划(计划)到车时间',
actual_arrival_time                                timestamp                      COMMENT '实际到车时间',
planned_departure_time                             timestamp                      COMMENT '规划发车时间',
actual_departure_time                              timestamp                      COMMENT '实际发车时间',
lock_time                                          timestamp                      COMMENT '封签时间',
unlock_time                                        timestamp                      COMMENT '锁封时间',
handling_type_id                                   smallint                       COMMENT '装载类型 1:只装不卸 2:只卸不装 3:有装有卸',
handling_type_name                                 String                         COMMENT '装卸类型名称'
)
COMMENT '承运商账单经停信息表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_capacity_field'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);
